An aspect of the invention relates, in general, to processing within a computing environment, and in particular, to facilitating management of threads within the computing environment.
A thread typically exists within a process, and a process may have multiple threads that share resources, such as memory. A thread is considered the smallest unit of processing that can be scheduled by an operating system. A thread can execute on a processor with no other threads executing thereon or on a processor with other threads. In the case where the thread is the only thread executing on the processor, the processor is said to be executing in single thread mode. However, in the case in which the thread is executing with other threads, the processor is said to be in simultaneous multithreading (SMT) mode.
In simultaneous multithreading mode, hardware resources are shared among multiple software threads executing on a machine. Each thread appears to have its own complete set of architecture hardware. Furthermore, in superscalar processors, it is common to have multiple execution pipelines that can be shared among the threads being dispatched into the hardware. Though SMT provides an efficiency of hardware, allowing multiple threads to rapidly share the execution resources available, it comes with a performance cost of the individual threads. It is common for a thread that is alone on a processor to execute more rapidly than if that thread shared resources with another thread. This is because with SMT there may be resource contention issues between threads, and often a processor in SMT mode must limit what resources are available to each thread. For example, a processor with two floating point pipelines might only be able to use one floating point pipeline for a particular thread in SMT mode even if no other thread is using the second floating point pipeline. In contrast, if the processor was not in SMT mode, that thread can make use of both floating point pipelines.